<template>
	<view class="page">
		<view class="title">
			{{info.title}}
		</view>
		<view class="time">{{info.create_time_format}}</view>
		<view class="content">
		<rich-text :nodes="info.content"></rich-text>
		</view>
	</view>
</template>

<script>
		import {newsDetailAPI} from "@/api/api.js"
	export default {
		data() {
			return {
				info:{},
				id:''
			}
		},
		onLoad(option) {
			this.id=option.id
			this.getdata()
		},
		methods: {
			getdata(){
				newsDetailAPI({id:this.id}).then(res=>{
					this.info=res
				})
			}
		}
	}
</script>

<style scoped lang="scss">
.page{
	padding: 20rpx;
}
.title{
	font-size: 32rpx;
	font-weight: bold;
	text-align: center;
	line-height: 45rpx;
}
.time{
	color: #7C8191;
	font-size: 22rpx;
	text-align: center;
	margin-top: 10rpx;
}
.content{
	line-height: 40rpx;
	margin-top: 20rpx;
}
</style>
